<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title sec:authentication="name"></title>
    <!-- Bootstrap -->
    <link rel="stylesheet" th:href="@{/home/css/bootstrap.css}">
</head>
<body>
<div class="container">
    <h1 th:text="${msg.title}"></h1>
    <p class="bg-primary" th:text="${msg.content}"></p>
    <div sec:authorize="hasRole('ROLE_ADMIN')">
        <p class="bg-info" th:text="${msg.extraInfo}"></p>
    </div>
    <div sec:authorize="hasRole('ROLE_USER')">
        <p class="bg-info">无更多显示信息</p>
    </div>
    <form th:action="@{/logout}" method="post">
        <input type="submit" class="btn btn-primary" value="注销"/>
    </form>
</div>
</body>
</html>